package com.wh.org.dao;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.wh.org.pojo.Employee;
import com.wh.user.pojo.saltandpwd;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;


@Mapper
@Repository
public interface IEmployeeDao extends BaseMapper<Employee> {
    List<Employee> findByPage(@Param("page") IPage<Employee> page, @Param("ew") QueryWrapper<Employee> qw);
//    void add(Employee employee);
//    void del(Long id);
//    //修改员工信息 一个对象
//    void upd(Long id);
//
//
//    List<Employee> findAll();
//    Employee selectById(Long id);
    //批量删除
//    void patchDel(Long[] ids);
//
List<Long> findexecutiveIdByTaskId(Long taskId);


    Long findIdbyLogininfoId(Long id);

    void modify(Long employeeId, String username, String phone);

    void updateLogininfo(Long id, String username, String phone);


    saltandpwd selectpwd(Long employeeId);

    
    void updatapwd(Long employeeId, String newPwd);

    void updatePwd(String newPwd, Long id);

    Employee findByAccount(String account);

    Employee findByPhone(String phone);

    Long findEmployeeIdByloginId(Long loginid);

    String selectByIdname(Integer salesmanId);

    /**
     * inter类型的id
     * @param saleamanId
     * @return
     */
    Integer findIdbyLogininfoID(Long saleamanId);

    Long findLogininfoIdByid(Long id);
}
